package martin.tpfinal.grabar.principal;

import java.io.IOException;
import java.util.Properties;

import org.apache.log4j.Logger;

public class PropertiesUtils {

    
    private static final String PROPERTY_FILE = "captureword.properties";
    private static final Logger logger = Logger.getLogger(PropertiesUtils.class);
    
    
    private static Properties properties;
    
    public static Properties getProperties(){
        if(properties==null){
            properties = new Properties();
            try {
                properties.load(PropertiesUtils.class.getClassLoader().getResourceAsStream(PROPERTY_FILE));
            } catch (IOException e) {
                logger.error("Unexpected exception in initialize: ", e);
            }
        }
        return properties;
    }

    private PropertiesUtils(){}
    
}
